<template>
  <div class="ip_input" :style="isfocus ? 'border: solid 1px #14c6c1;' : 'border: solid 1px #ebebeb;'">
    <input
      type="text"
      v-model="iparr[0]"
      placeholder="IP"
      @focus="isfocus = true"
      @blur="isfocus = false"
    />
    <span>-</span>
    <input
      type="text"
      v-model="iparr[1]"
      @focus="isfocus = true"
      @blur="isfocus = false"
    />
    <span>-</span>
    <input
      type="text"
      v-model="iparr[2]"
      @focus="isfocus = true"
      @blur="isfocus = false"
    />
    <span>-</span>
    <input
      type="text"
      v-model="iparr[3]"
      @focus="isfocus = true"
      @blur="isfocus = false"
    />
    <span>:</span>
    <input
      type="text"
      v-model="iparr[4]"
      @focus="isfocus = true"
      @blur="isfocus = false"
    />
  </div>
</template>

<script setup>
const props = defineProps({
  iparr: Array,
})
const isfocus = ref(false)
</script>

<style lang="scss" scoped>
.ip_input {
  width: 260px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  justify-content: space-around;
  background-color: #fff;
  cursor: text;
  transition: box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  transform: translateZ(0);
}

.ip_input input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  outline: none;
  display: inline-block;
  height: 26px;
  line-height: 26px;
  margin: 0;
  padding: 0 6px;
  width: 19%;
  text-align: left;
  font-size: 14px;
  color: #606266;
  background-color: transparent;
}

span {
  color: #b5b5b5;
}
</style>

<style>
.ip_input input::placeholder {
  font-family: PingFangSC;
  font-size: 14px;
  line-height: 1.43;
  color: #b7bdc6;
}
</style>